﻿@using Shp.Web.Controllers;
@{
    ViewBag.Title = "JQueryStuff";
    Layout = "~/Views/Shared/_Layout.Light.cshtml";
}
<div id="nav" class="clearfix">
@Html.MvcContrib().Menu(settings => {    
    settings.RootMenuContainerClass = "nav";
}).Items(menu => {
    menu.Action<HomeController>(c => c.Index(), "Menu Home")
        .AnchorAttributes(@class => "a-root").ItemAttributes(@class => "root-no-sub");
    menu.Link("Search Tools").Items(sub => {        
        sub.Link("Google", "http://www.google.com", Url.Content("~/Content/ico/google.png")).Target("_blank");
        sub.Link("Bing", "http://www.bing.com", Url.Content("~/Content/ico/bing.png")).Target("_blank");
        sub.Link("Yahoo", "http://www.yahoo.com/", Url.Content("~/Content/ico/yahoo.png")).Target("_blank");
        sub.Link("DogPile", "http://www.dogpile.com/", Url.Content("~/Content/ico/dogpile.png")).Target("_blank");
        sub.Link("Ask", "http://www.ask.com/", Url.Content("~/Content/ico/ask.png")).Target("_blank");        
    }).AnchorAttributes(@class => "a-root");
    menu.Link("Sports").Items(sub => {
        sub.Link("Football", null, Url.Content("~/Content/ico/sport_football.png")).Items(ssub =>
        {
            ssub.Link("ESPN NFL", "http://espn.go.com/nfl/", Url.Content("~/Content/ico/sport_football.png")).Target("_blank");
            ssub.Link("NCAA Football", "http://www.ncaa.com/sports/football/fcs", Url.Content("~/Content/ico/ncaa.png")).Target("_blank");
            ssub.Link("ESPN NCAA Football", "http://espn.go.com/college-football/", Url.Content("~/Content/ico/espn.png")).Target("_blank");
            ssub.Link("FSU Football", "http://www.seminoles.com/sports/m-footbl/fsu-m-footbl-body.html", Url.Content("~/Content/ico/fsu.png")).Target("_blank");
        });
        sub.Link("Baseball", null, Url.Content("~/Content/ico/baseball.png")).Items(ssub => {
            ssub.Link("ESPN MLB", "http://espn.go.com/mlb/", Url.Content("~/Content/ico/baseball.png")).Target("_blank");
            ssub.Link("NCAA Baseball", "http://www.ncaa.com/sports/baseball/d1", Url.Content("~/Content/ico/ncaa.png")).Target("_blank");
            ssub.Link("ESPN NCAA Baseball", "http://search.espn.go.com/college-baseball/", Url.Content("~/Content/ico/espn.png")).Target("_blank");
        });
        sub.Link("Basketball", null, Url.Content("~/Content/ico/sport_basketball.png")).Items(ssub => {
            ssub.Link("ESPN NBA", "http://espn.go.com/nba/", Url.Content("~/Content/ico/sport_basketball.png"));
            ssub.Link("NCAA Basketball", "http://www.ncaa.com/sports/basketball-men/d1", Url.Content("~/Content/ico/ncaa.png")).Target("_blank");
            ssub.Link("ESPN NCAA B-Ball", "http://espn.go.com/mens-college-basketball/", Url.Content("~/Content/ico/espn.png")).Target("_blank");
        });
        sub.Link("College", null, Url.Content("~/Content/ico/ncaa.png")).Items(ssub => {
            ssub.Link("NCAA Sports", "http://www.ncaa.com/", Url.Content("~/Content/ico/ncaa.png")).Target("_blank");
            ssub.Link("ESPN College Sports", "http://espn.go.com/college-sports/", Url.Content("~/Content/ico/sport_soccer.png")).Target("_blank");
            ssub.Link("ESPN NCAA Football", "http://espn.go.com/college-football/", Url.Content("~/Content/ico/sport_football.png")).Target("_blank");
            ssub.Link("ESPN NCAA Baseball", "http://search.espn.go.com/college-baseball/", Url.Content("~/Content/ico/baseball.png")).Target("_blank");
            ssub.Link("ESPN NCAA B-Ball", "http://espn.go.com/mens-college-basketball/", Url.Content("~/Content/ico/sport_basketball.png")).Target("_blank");
            ssub.Link("FSU Football", "http://www.seminoles.com/sports/m-footbl/fsu-m-footbl-body.html", Url.Content("~/Content/ico/fsu.png")).Target("_blank");
        });
        sub.Link("Professional", null, Url.Content("~/Content/ico/star.png")).Items(ssub => {
            ssub.Link("ESPN NFL", "http://espn.go.com/nfl/", Url.Content("~/Content/ico/sport_football.png")).Target("_blank");
            ssub.Link("ESPN MLB", "http://espn.go.com/mlb/", Url.Content("~/Content/ico/baseball.png")).Target("_blank");
            ssub.Link("ESPN NBA", "http://espn.go.com/nba/", Url.Content("~/Content/ico/sport_basketball.png")).Target("_blank");
        });
    }).AnchorAttributes(@class => "a-root");
    menu.Link("News").Items(sub => {
        sub.Link("Fox News", "http://www.foxnews.com/", Url.Content("~/Content/ico/fox.png")).AnchorAttributes(target => "thisWillBeOverWritten").Target("_blank");
        sub.Link("MSNBC", "http://www.msnbc.msn.com/", Url.Content("~/Content/ico/msnbc.png")).AnchorAttributes(target => "namedTarget");
        sub.Link("CNN", "http://www.cnn.com", Url.Content("~/Content/ico/cnn.png")).Target("_blank");
    }).AnchorAttributes(@class => "a-root");
    menu.Link("Sale Items").Items(sub => {
        sub.Content(
            @:@Html.Partial("_megamenu.porsche")
        );
        // class sf-shadow-off removes shadowing
    }).ListAttributes(style =>
        "width: 450px;", @class => "sf-shadow-off", id => "sale").AnchorAttributes(@class => "a-root");

    menu.Action<MenuController>(c => c.Index(), "Menu Home")
        .AnchorAttributes(@class => "a-root").ItemAttributes(@class => "root-no-sub");
})
</div>

<script type="text/javascript">
    $(function () {
        // animation options are necessary to avoid IE animation opacity bleeding - caused by IE filtering
        var animationOptions = ($.support.opacity) ? { opacity: 'show', height: 'show'} : { height: 'show' };
        $('ul.nav').superfish({
            hoverClass: 'sfHover',
            delay: 750,
            animation: animationOptions,
            speed: 250,
            autoArrows: false
        });
        // navigation add subfish to indicate more navigation
        $('.nav li li:has(ul) > a').addClass('subfish');
    });
</script> 

<div class="page">
    Source: <a href="http://jquerystuff.net/random/superfish/" target="_blank">Superfish with Images and sub navigation pointers</a>
</div>

@section Head{
    <link href="@Url.Content("~/Content/css/jquerystuff.demo.css")" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/css/clearfix.css")" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="@Url.Content("~/Scripts/superfish.js")"></script>
    <script type="text/javascript" src="@Url.Content("~/Scripts/jquery.hoverIntent.min.js")"></script>     
}

@{   
    ViewBag.CodeViewType = Shp.Web.Models.GridCodeViewType.JQueryStuff;
}
@Html.Partial("_codeviewer")